package com.soladhoc.webapps.client.mvp;

import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.soladhoc.webapps.client.place.NameTokens;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import com.google.inject.Inject;
import com.google.gwt.event.shared.EventBus;
import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;

public class AnnouncesPresenter extends
		Presenter<AnnouncesPresenter.AnnounceView, AnnouncesPresenter.MyProxy> {

	/**
	 * This is the view in which announces are presented
	 * @author Pierre
	 *
	 */
	public interface AnnounceView extends View {
		void setTitle(String title);
		void setTextOfAnnounce(String text);
	}

	@ProxyStandard
	@NameToken(NameTokens.announces)
	public interface MyProxy extends ProxyPlace<AnnouncesPresenter> {
	}

	@Inject
	public AnnouncesPresenter(final EventBus eventBus, final AnnounceView view,
			final MyProxy proxy) {
		super(eventBus, view, proxy);
	}

	@Override
	protected void revealInParent() {
		RevealRootContentEvent.fire(this, this);
	}
}
